#include <iostream>
#include <math.h>
using namespace std;

int findPythagoreanTripletProduct(){
    int c = 0;
    for(int b = 2; b < 500; b++){
        for(int a = 1; a<b ; a++){
            c = sqrt(a*a + b*b);
            if(c > a && c>b){
                if(a+b+c == 1000){
                    if(a*a + b*b == c*c){
                        cout << "a: " << a << " b: " << b << " c: " << c << endl;
                        return a*b*c;
                    }
                }
            }
        }
    }
    return 0;
}

int main()
{

    int answer = findPythagoreanTripletProduct();
    cout << "The Product Of the Pythagorean triplet of 1000 is: " << answer << endl;
    return 0;
}
